#include <stdio.h>

int main() {
    char userType;
    int consumption;
    double bill = 0.0;

    printf("Enter user type (H for Household, C for Commercial): ");
    scanf(" %c", &userType);
    printf("Enter water consumption in litres: ");
    scanf("%d", &consumption);

    if (consumption <= 5000) {
        bill = consumption * 0.10;
    } else if (consumption <= 20000) {
        bill = 5000 * 0.10 + (consumption - 5000) * 0.15;
    } else {
        bill = 5000 * 0.10 + 15000 * 0.15 + (consumption - 20000) * 0.25;
    }
    if (userType == 'C' || userType == 'c') {
        bill += bill * 0.25;
    }
    printf("Final Payable Amount: %.0f BDT\n", bill);

    return 0;
}
